#ifndef DependencyPipe3O_H
#define DependencyPipe3O_H
#include"DependencyPipe3OGSibling.h"

class DependencyPipe3O :public DependencyPipe3OGSibling{
protected:
	virtual void addExtendedFeatures(DependencyInstance *instance, FeatureVector *fv);

	virtual void writeExtendedFeatures(DependencyInstance *instance, ObjectWriter &out);

	void addTriTripFeatures(DependencyInstance *instance, int par, int ch1, int ch2, int ch3, FeatureVector *fv);

	void addTriSibFeatures(DependencyInstance *instance, int ch1, int ch2, int ch3, bool isST, FeatureVector *fv);

public:
	DependencyPipe3O(ParserOptions *options);

	virtual ~DependencyPipe3O();

	void fillFeatureVectors(DependencyInstance* instance, vector<vector<vector<double> > > &probs, 
		vector<vector<vector<double> > > &probs_trips, vector<vector<vector<double> > > &probs_sibs, 
		vector<vector<vector<double> > > &probs_grands, vector<vector<double> > &probs_gchs, 
		vector<vector<vector<vector<double> > > > &probs_gtrips, vector<vector<vector<vector<double> > > > &probs_gsibs, 
		vector<vector<vector<double> > > &probs_coords,
		vector<vector<vector<vector<double> > > > &probs_ttrips, vector<vector<vector<vector<double> > > > &probs_tsibs,
		vector<vector<vector<vector<double> > > > &nt_probs, Parameters* params);

	DependencyInstance* readInstance(ObjectReader &in, int length, vector<vector<vector<double> > > &probs, 
		vector<vector<vector<double> > > &probs_trips, vector<vector<vector<double> > > &probs_sibs, 
		vector<vector<vector<double> > > &probs_grands, vector<vector<double> > &probs_gchs, 
		vector<vector<vector<vector<double> > > > &probs_gtrips, vector<vector<vector<vector<double> > > > &probs_gsibs, 
		vector<vector<vector<double> > > &probs_coords,
		vector<vector<vector<vector<double> > > > &probs_ttrips, vector<vector<vector<vector<double> > > > &probs_tsibs,
		vector<vector<vector<vector<double> > > > &nt_probs, Parameters* params);
};
#endif
